#include<bits/stdc++.h>
#define MAXN 100005
using namespace std;
int n,r,cnt,ans,a[MAXN];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=n;++i)
    {
        scanf("%d",&r);
        a[r]++;
    }
    ans=n;
    for(int i=1;i<=MAXN;++i)
    {
        ans-=min(cnt,a[i]);
        cnt=max(cnt-a[i],0);
        cnt+=a[i];
    }
    printf("%d\n",ans);
    return 0;
}
